<!--
  ~ This program is part of the OpenLMIS logistics management information system platform software.
  ~ Copyright © 2013 VillageReach
  ~
  ~ This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  ~  
  ~ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.
  ~ You should have received a copy of the GNU Affero General Public License along with this program.  If not, see http://www.gnu.org/licenses.  For additional information contact info@OpenLMIS.org. 
  -->

<div id="changePassword" modal="changePasswordModal" options="{'backdrop':'static', 'escape':false}">
  <form name="passwordForm">
    <div class="modal-header">
      <h3>
        <span openlmis-message="message.reset.password"></span>&nbsp;<span ng-bind="user.firstName"></span>&nbsp;
        <span ng-bind="user.lastName"></span>
      </h3>
    </div>

    <div class="modal-body">
      <div ng-hide="message">
        <form name='ResetPasswordForm'>
          <div class="row-fluid">
            <span class="span6">
              <div class="row-fluid">
                <label openlmis-message="placeholder.new.password"></label>
                <input type="password" id="password1" ng-trim="false" oncopy="return false;"
                       maxlength="16"
                       ng-model="user.password1"/>
              </div>
              <div class="row-fluid">
                <label openlmis-message="placeholder.reenter.password"></label>
                <input type="password" id="password2" ng-trim="false" oncopy="return false;"
                       maxlength="16"
                       ng-model="user.password2"/>
              </div>
            </span>
            <span>
              <div id="passwordRules" class="row-fluid span6">
                <label openlmis-message="placeholder.password.rules"></label>
              </div>
            </span>
          </div>
          <div class="alert alert-error" ng-bind="passwordError" ng-show="passwordError"></div>
        </form>
      </div>

    </div>

    <div class="modal-footer">
      <input id="resetPasswordDone" type="button" class="btn btn-primary" openlmis-message="button.done"
             ng-click="updatePassword()"/>
      <input id="resetPasswordCancel" type="button" class="btn btn-cancel" openlmis-message="button.cancel"
             ng-click="resetPasswordModal()"/>
    </div>

  </form>
</div>